package com.sf.fy.uav.common.request.order;

import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author LTQ
 */

@Data
@Validated
public class RescuePrepareOrderRequest {


    @ApiModelProperty("备注")
    private String remark;

    @NotNull(message = "配送费不能为空")
    @ApiModelProperty("配送费")
    private BigDecimal expressFee;

    @NotNull(message = "商品总金额不能为空")
    @ApiModelProperty("商品总金额")
    private BigDecimal price;

    @NotNull(message = "购买商品数量不能为空")
    @ApiModelProperty("购买商品数量")
    private Integer num;

    @NotNull(message = "总价不能为空")
    @ApiModelProperty("总价=商品总金额+配送费")
    private BigDecimal totalPrice;

    @NotBlank(message = "投放点id不能为空")
    @ApiModelProperty("投放点id")
    private String placementPointId;


    @ApiModelProperty("收件人姓名")
    @NotBlank(message = "收件人姓名不能为空")
    private String receiverName;

    @ApiModelProperty("收件人电话")
    @NotBlank(message = "收件人电话不能为空")
    private String receiverTel;

    @ApiModelProperty("购物车")
    @NotEmpty(message = "购物车不能为空")
    List<CommodityRequest> commodityRequests;

    //这个为空也不报异常,需要核对一下
    @ApiModelProperty("用于获取openid")
    @NotBlank(message = "loginCode不能为空")
    private String loginCode;

}
